package com.hrt.datasender.datastorage.strategy;

import com.btcode.reflect.IClassFinder;

public class StrategyClassFinder implements IClassFinder {

    @Override
    public boolean isMatch(Class<?> myClass) {

        Object instance;

        try {
            instance = myClass.newInstance();
        }
        catch (InstantiationException | IllegalAccessException e) {
            return false;
        }

        if (instance instanceof IStorageStrategy) {
            return true;
        }

        return false;
    }

}
